//
//  LHPassWordViewController.m
//  密码输入框
//
//  Created by zhouLiHuan on 2017/2/8.
//  Copyright © 2017年 zhouLiHuan. All rights reserved.
//

#import "LHPassWordViewController.h"
#import "PassWordView.h"

@interface LHPassWordViewController ()<PassWordViewDelegate>

@end

@implementation LHPassWordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    PassWordView *TXView = [[PassWordView alloc]initWithFrame:CGRectMake(0, 100,SCREEN_WIDTH, 200) withTitle:@"请输入交易密码"];
    TXView.delegate = self;
    if (![TXView.textField becomeFirstResponder])
    {
        //成为第一响应者。弹出键盘
        [TXView.textField becomeFirstResponder];
    }
    [self.view addSubview:TXView];
}

#pragma mark  密码输入结束后调用此方法
- (void)passwordView:(PassWordView *)passwordView withPasswordString:(NSString *)password{
    NSLog(@"密码为%@",password);
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
